<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcss.com/vue/2.3.4/vue.js"></script>
</head>
<body>
<div id="app">
    <h3>数字变美元</h3>
    <input type="text" placeholder="数字变美元" v-model="num">
    <span>{{num|money}}</span>
    <h3>内容反转</h3>
    <input type="text" placeholder="内容反转" v-model="message">
    <span>{{message|reverse}}</span>
</div>
<script>
    Vue.filter("money",
       function(value){
           return "$"+value
    });
    var app=new Vue({
        el:"#app",
        data:{
            num:100,
            message:""
        },
        filters:{
            reverse:function(value){
                return value.split('').reverse().join('')
            }
        }
    })
</script>
</body>
</html>